<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML >
<html lang="zh-CN">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<script type="text/javascript"  src="js/jquery.js"></script>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<style type="text/css">
		body{
			background-image:url(img/bg.png);
		}
		span{
		color:red;
		
		}
	</style>
</head>
<body>

	<div class="container" style="margin-top:100px">
		<form action="login.jspx" class="well" style="width:220px;margin:0px auto;" id="myform" method="post">
		  <legend><br>Kaishengit-PMS</legend>
		  
   <c:choose>
	      <c:when test="${param.id == '10001'}">
  			<div style="color:red">请先登录</div>
  		</c:when>
  		<c:when test="${param.id == '10002' }">
  			<div style="color:red">用户名或密码错误</div>
  		</c:when>
	<c:when test="${param.id == '10003' }">
  			<div style="color:red">密码修改成功</div>
  		</c:when>
    </c:choose>
		  <label>账号</label>
		  <input class="span3"  type="text"  name="username"><span id="user_error"></span>
		  <label>密码</label>
		  <input class="span3"  type="password"  name="password"><span id="pass_error"></span>
		  <br>
		  <button type="button" class="btn btn-primary"  id="button">进入系统</button>
		  
		</form>
	</div>
	
	<script type="text/javascript">
	$(document).ready(function(){
	$("input[name='username']").keydown(function(){
		$("#user_error").html("");
	});
	$("input[name='password']").keydown(function(){
		$("#pass_error").html("");
	});
	
	$("#button").click(function(){
	var name=$("input[name='username']").val();
	var pass=$("input[name='password']").val();
	if(name.trim()==""){
	$("input[name='username']").focus();
	$("#user_error").html("请输入账号");
	 return;
	}
	if(pass==""){
	$("input[name='password']").focus();
	$("#pass_error").html("请输入密码");
  					return;
	}
	
		$("#myform").submit();
	});
	
	
	});
	
	
	</script>
	

</body>




</html>